package org.hxd.document.service;

import org.hxd.document.dao.DocumentDao;
import org.hxd.pojo.Document;
import org.hxd.units.PageModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DocumentServiceImpl implements DocumentService {
    @Autowired
    DocumentDao documentDao;

    @Override
    public List<Document> findDocument(Document document, PageModel pageModel) {
        return documentDao.findDocument(document,pageModel);
    }

    @Override
    public int findDocumentcount(Document document) {
        return documentDao.findDocumentcount(document);
    }

    @Override
    public Document findDocumentByid(Integer id) {
        return documentDao.findDocumentByid(id);
    }

    @Override
    public int removeDocument(Integer id) {
        return documentDao.removeDocument(id);
    }

    @Override
    public int addDocument(Document document) {
        return documentDao.addDocument(document);
    }

    @Override
    public int modifyDocument(Document document) {
        return documentDao.modifyDocument(document);
    }
}
